<?php
	include("inc/db.class.php");
?>
<!DOCTYPE HTML>
<html>
  <head>
    <title>User registration</title>
			<link rel="SHORTCUT ICON" href="img/favicon.ico" />	
			<script type="text/javascript" src="jquery/jquery-1.8.0.min.js"></script>
			<script type="text/javascript" src="js/registration.js"></script> 
			<link rel="stylesheet" href="css/style.css" />
			<link rel="stylesheet" href="css/grid-12.css" />
			<meta name="description" content="TRAINING" />
			<meta name="keywords" content="NERIST TRAINING PLACEMENT" />
			<meta name="author" content="SMARTEK RECRUITMENT TEAM" />
			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
			<script type="text/javascript" src="script/product_registration.js"></script>  
			<script type="text/javascript" language="javascript">
				$(function(){
				    var recaptcha=1;
					getCaptcha();
				});

				function getCaptcha()
				{
					$.post('ajax/getCaptcha.php', function(data){
										var splited_data = data.split("_");
										var nmbr = splited_data['0'];
										var captcha_value = splited_data['1'];
										$('#captcha_challenge_field').val(nmbr);
						$('.captcha').html(captcha_value);
						});
				}
			</script>
  </head>
  <body>
    <div id="container" class="container_12">
    <?php require("php/header.php"); ?>
      <div id="line" class="grid_12"></div>
      <div id="" class="grid_7">
				<h3>User registration</h3><br />
        <?php include("html/registration-form.html"); ?>
      </div>
	  
	  					<div class="grid_5  alpha omega right_block">
						<div class="social-login-wrapper">
							<h3>Social sign up</h3> <br>


							<?php
								include_once 'src/facebook.php';
								// App name Uttu
								// Create our Application instance (replace this with your appId and secret).
								$facebook = new Facebook(array(
								  'appId'  => APP_ID, //'334619919999877',
								  'secret' => APP_SECRET, //'ec96fb04e9c2ae9782718e1a4cfbc946',
								));

								// Get User ID
								$user = $facebook->getUser();
								
								$params = array(
								  'scope' => 'read_stream, friends_likes, email',
								  'redirect_uri' => 'http://'.SERVER.'/'.ROOT_DIR.'facebook-login-process.php',
								  'display' => 'popup'
								  
								);

								
								if ($user) {
								$params = array( 'next' => 'http://'.SERVER.'/'.ROOT_DIR.'logout.php' );
								  $logoutUrl = $facebook->getLogoutUrl($params);
								  //header("location: index.php");
								  echo "<a href='".$logoutUrl."'>facebook logout</a>";
								  
								} else {
								  $loginUrl = $facebook->getLoginUrl($params);
								   echo "<a href='".$loginUrl."'><img src=\"img/facebook-login-button.png\"/></a></br></br>";
								}
							?>
							<a class="social_netowrk_login_link" href="google-openid/login-google.php?login&oauth_provider=google">Login with <img src="img/google.png" height="30" style="margin-bottom: -10px;"/></a>
						</div>
						
					</div> 
			<div></div>
			<?php require("php/footer.php"); ?>
    </div>
  </body>
</html>
